//
//  IndexProtocol.h
//  SimulacraDB
//
//  Created by Andre Cohen on 8/15/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "IndexRecord.h"
#import "Record.h"

@protocol IndexProtocol

// Data access
- (NSArray *)getObject:(IndexRecord *)value;
- (void)insertObject:(IndexRecord *)record;
- (void)removeObject:(IndexRecord *)record;

// Save/Open index
- (void)load:(NSString *)name;
- (void)save:(NSString *)name;

// Compare records
- (BOOL)isRecord:(IndexRecord *)a lessThan:(IndexRecord *)b;
- (BOOL)isRecord:(IndexRecord *)a greaterThan:(IndexRecord *)b;
- (BOOL)isRecord:(IndexRecord *)a equalTo:(IndexRecord *)b;

@end
